package com.md.controller;

import com.md.api.goods.GoodsTypeApi;
import com.md.application.goods.GoodsTypeApplicationService;
import com.md.model.request.goods.InsertGoodsTypeRequest;
import com.md.model.system.CommonResult;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 商品类别控制器
 *
 * @author 刘骄阳
 * 2022-03-12 15:14
 */
@RestController
public class GoodsTypeController implements GoodsTypeApi {
  @Resource
  GoodsTypeApplicationService goodsTypeApplicationService;

  /**
   * 后台添加商品类别
   *
   * @param request 商品类别
   * @return 操作结果
   */
  @Override
  public CommonResult<Long> insert(InsertGoodsTypeRequest request) {
    return goodsTypeApplicationService.insert(request);
  }
}
